<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title> - 学生信息</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link href="${ctx!}/js/plugins/layui/css/layui.css" rel="stylesheet" />
    <style type="text/css">
        .layui-form-item{
            margin: 50px 0 0 200px
        }

    </style>
</head>

<body>

<fieldset id="dataList" class="layui-elem-field layui-field-title sys-list-field">
    <legend style="text-align:center;">学生添加</legend>
</fieldset>
<form class="layui-form layui-form-pane"  lay-filter="form">
    <div class="layui-form-item">
            <input type="hidden" name="id"  value="${(student.id)!}" >
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">学号</label>
        <div class="layui-input-inline">
            <input type="text" name="num" lay-verify="required" placeholder="请输入学生学号" value="${(student.num)!}"
                   autocomplete="off" class="layui-input">
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">姓名</label>
        <div class="layui-input-inline">
            <input type="text" name="name"  lay-verify="required" placeholder="请输入学生姓名" value="${(student.name)!}"
                   autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">性别</label>
        <div class="layui-input-inline">
            <input type="radio" name="sex" title="男" value="男" <#if student.sex == "男">checked</#if> />
            <input type="radio" name="sex" title="女" value="女" <#if student.sex == "女">checked</#if> />
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">密码</label>
        <div class="layui-input-inline">
            <input type="text" name="description" lay-verify="description" placeholder="请输入密码" value="${(student.password)!}"
                   autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">请选择院系专业</label>
        <div class="layui-input-inline">
            <select name="dept" lay-filter="depts">
                <option value="">请选择院系</option>
            <#list depts as x>
                <option value="${x.id}"
                    <#if (student.major.name == x.name)> selected="selected" </#if>
                >${x.name}</option>
            </#list>
            </select>
        </div>
        <div class="layui-input-inline">
            <select name="major" lay-filter="majors">
                <option value="">请选择专业</option>
            </select>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">班级</label>
        <div class="layui-input-inline">
            <input type="text" name="sclass"  lay-verify="required" placeholder="请输入学生姓名" value="${(student.sclass)!}"
                   autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <button class="layui-btn" lay-submit lay-filter="add">立即提交</button>
    </div>

</form>

<script src="${ctx!}/js/plugins/layui/layui.js"></script>
<script src="${ctx!}/js/common.js"></script>
<!-- layui规范化用法 -->
<script type="text/javascript">
    layui.config({
        base: '${ctx}/js/'
    }).use('admin/student/form');
</script>
<div id="google_translate_element" style="position:absolute;bottom:10px;right:10px;z-index:2000;opacity:0.7"></div>
<script>
    function googleTranslateElementInit() {

        new google.translate.TranslateElement(
            {

                includedLanguages: 'en,zh-CN,hr,cs,da,nl,fr,de,el,iw,hu,ga,it,ja,ko,pt,ro,ru,sr,es,th,vi',

                layout: google.translate.TranslateElement.InlineLayout.SIMPLE,

                autoDisplay: true,

            },
            'google_translate_element'//触发按钮的id
        );

    }
</script>
<script src="https://translate.google.cn/translate_a/element.js?cb=googleTranslateElementInit"></script>
</body>

</html>
